package org.bedracket.pgeg.datagen;

import net.minecraft.data.PackOutput;
import net.minecraftforge.client.model.generators.ItemModelBuilder;
import net.minecraftforge.client.model.generators.ItemModelProvider;
import net.minecraftforge.client.model.generators.ModelFile;
import net.minecraftforge.common.data.ExistingFileHelper;
import org.bedracket.pgeg.PGEGMod;
import org.bedracket.pgeg.init.ModItems;
import org.bedracket.pgeg.util.Helpers;

public class ModItemModelProvider extends ItemModelProvider {

    public ModItemModelProvider(PackOutput output, ExistingFileHelper existingFileHelper) {
        super(output, PGEGMod.MOD_ID, existingFileHelper);
    }

    @Override
    protected void registerModels() {
        basicItem(ModItems.BROWNIE.get());
        basicItem(ModItems.DOUGH.get());
        basicItem(ModItems.MANA_CRYSTAL_DUST.get());
        basicItem(ModItems.BURRITO_BEEF.get());
        basicItem(ModItems.BURRITO_FISH.get());
        basicItem(ModItems.BURRITO_VEGGIE.get());
        basicItem(ModItems.CARAMEL.get());
        basicItem(ModItems.CARAMEL_APPLE.get());
        basicItem(ModItems.COOKIE_CAT.get());
        basicItem(ModItems.CREAM_COOKIE.get());
        basicItem(ModItems.CARAMEL_DONUT.get());
        basicItem(ModItems.SUGAR_DONUT.get());
        basicItem(ModItems.CHEESE.get());
        basicItem(ModItems.CHEESE_FRIES.get());
        basicItem(ModItems.BERRY_JELLY.get());
        basicItem(ModItems.LION_LICKER.get());
        basicItem(ModItems.NIGIRI_COD.get());
        basicItem(ModItems.NIGIRI_SALMON.get());
        basicItem(ModItems.NIGIRI_SQUID.get());
        basicItem(ModItems.ONIGIRI.get());
        basicItem(ModItems.CHOCOLATE_PIE.get());
        basicItem(ModItems.BERRY_PIE.get());
        basicItem(ModItems.SLIME_PIE.get());
        basicItem(ModItems.RAW_SQUID.get());
        basicItem(ModItems.COOKED_SQUID.get());
        basicItem(ModItems.RICE.get());
        basicItem(ModItems.APPLE_PIE.get());
        basicItem(ModItems.BERRY.get());
        basicItem(ModItems.NIGIRI_TROPICAL.get());
        basicItem(ModItems.ROLL_SEA_PICKLE.get());
        basicItem(ModItems.ORICHALCUM_INGOT.get());
        basicItem(ModItems.SATURNIUM_INGOT.get());
        basicItem(ModItems.BRIMSTONE_INGOT.get());
        basicItem(ModItems.METEORITE_INGOT.get());
        basicItem(ModItems.MITHRIL_INGOT.get());
        basicItem(ModItems.BACON.get());
        basicItem(ModItems.ORICHALCUM_PICKAXE.get());
        basicItem(ModItems.SATURNIUM_PICKAXE.get());
        basicItem(ModItems.BRIMSTONE_PICKAXE.get());
        basicItem(ModItems.METEORITE_PICKAXE.get());
        basicItem(ModItems.MITHRIL_PICKAXE.get());
        basicItem(ModItems.ORICHALCUM_SHOVEL.get());
        basicItem(ModItems.SATURNIUM_SHOVEL.get());
        basicItem(ModItems.BRIMSTONE_SHOVEL.get());
        basicItem(ModItems.METEORITE_SHOVEL.get());
        basicItem(ModItems.MITHRIL_SHOVEL.get());
        basicItem(ModItems.ORICHALCUM_HOE.get());
        basicItem(ModItems.SATURNIUM_HOE.get());
        basicItem(ModItems.BRIMSTONE_HOE.get());
        basicItem(ModItems.METEORITE_HOE.get());
        basicItem(ModItems.MITHRIL_HOE.get());
        basicItem(ModItems.ORICHALCUM_AXE.get());
        basicItem(ModItems.SATURNIUM_AXE.get());
        basicItem(ModItems.BRIMSTONE_AXE.get());
        basicItem(ModItems.METEORITE_AXE.get());
        basicItem(ModItems.MITHRIL_AXE.get());
        basicItem(ModItems.ORICHALCUM_SHEARS.get());
        basicItem(ModItems.SATURNIUM_SHEARS.get());
        basicItem(ModItems.BRIMSTONE_SHEARS.get());
        basicItem(ModItems.METEORITE_SHEARS.get());
        basicItem(ModItems.MITHRIL_SHEARS.get());
        basicItem(ModItems.ORICHALCUM_SWORD.get());
        basicItem(ModItems.SATURNIUM_SWORD.get());
        basicItem(ModItems.BRIMSTONE_SWORD.get());
        basicItem(ModItems.METEORITE_SWORD.get());
        basicItem(ModItems.MITHRIL_SWORD.get());
        cropItem("tomato");
        basicItem(ModItems.AIR_SHARD.get());
        basicItem(ModItems.AQUA_SHARD.get());
        basicItem(ModItems.EARTH_SHARD.get());
        basicItem(ModItems.ENTROPY_SHARD.get());
        basicItem(ModItems.FIRE_SHARD.get());
        basicItem(ModItems.ORDER_SHARD.get());
        basicItem(ModItems.SILVER_INGOT.get());
        basicItem(ModItems.BAGUA_COMPASS.get());
        basicItem(ModItems.QIAN_DIAGRAM.get());
        basicItem(ModItems.KUN_DIAGRAM.get());
        basicItem(ModItems.ZHEN_DIAGRAM.get());
        basicItem(ModItems.XUN_DIAGRAM.get());
        basicItem(ModItems.KAN_DIAGRAM.get());
        basicItem(ModItems.LI_DIAGRAM.get());
        basicItem(ModItems.GEN_DIAGRAM.get());
        basicItem(ModItems.DUI_DIAGRAM.get());
        basicItem(ModItems.YANG_YAO.get());
        basicItem(ModItems.YIN_YAO.get());
        basicItem(ModItems.TALISMAN.get());
        basicItem(ModItems.SILVER_PICKAXE.get());
        basicItem(ModItems.SILVER_AXE.get());
        basicItem(ModItems.SILVER_HOE.get());
        basicItem(ModItems.SILVER_SHOVEL.get());
        basicItem(ModItems.SILVER_HELMET.get());
        basicItem(ModItems.SILVER_CHEST.get());
        basicItem(ModItems.SILVER_LEGGINGS.get());
        basicItem(ModItems.SILVER_BOOTS.get());
    }

    public ItemModelBuilder cropItem(String name) {
        return getBuilder(name)
                .parent(new ModelFile.UncheckedModelFile("item/generated"))
                .texture("layer0", Helpers.identifier("item/" + name));
    }

}
